///
/// Override the Databind() method, call the base DataBind() method and
/// set the value of a field based on the identity of the currently
/// logged-in user.
///
public override void DataBind()
{
// Call base.DataBind()
base.DataBind();
// If the user is logged-in set the text of the control
// equal to the loginId
if (!(this.Page.CurrentSecurity.GetUserStatus() == ""))
{
this.${Field Control}.Text = "Created by: " + this.Page.CurrentSecurity.GetUserStatus();
}
else
{
// Since the user is not logged in set ${Field Control} text to any value.
this.${Field Control}.Text = "Not Signed In";
}
}
|